import java.util.ArrayList;


public class Principal {
	double w0, w1, w2;
	int x1,x2;
	double mu;
	int N = 3;
	
	public Principal() {
		w0 = -10;
		w1 = 75;
		w2 = -60;
		
		x1 = 0;
		x2 = 0;
		
		mu = 0.1;
	}
	
	public double v(int y1, int y2){
		return (this.w0 + this.w1 * y1 + this.w2 * y2); 
	}
	
	public void minCuadrados(int y1, int y2){
		double vb1 = this.v(y1, y2);
		double vb0 = this.v(this.x1, this.x2);
		for (int i = 0; i<3; i++){
			if (i==0){
				this.w0 = this.w0 + this.mu * (vb1 - vb0) * 1;  
			}
			if (i==1){
				this.w1 = this.w1 + this.mu * (vb1 - vb0) * this.x1;  
			}
			if (i==2){
				this.w2 = this.w2 + this.mu * (vb1 - vb0) * this.x2;  
			}
		}
	}

}
